﻿using Localization.Resources.AbpUi;
using Rechargeable.Localization;
using Volo.Abp.Account;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.HttpApi;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;

namespace Rechargeable
{
    [DependsOn(
           typeof(RechargeableApplicationContractsModule),
           typeof(AbpAccountHttpApiModule),
           typeof(AbpIdentityHttpApiModule),
           typeof(AbpPermissionManagementHttpApiModule),
           typeof(AbpTenantManagementHttpApiModule),
           typeof(AbpFeatureManagementHttpApiModule),
           typeof(AbpSettingManagementHttpApiModule),
           typeof(Amazon.AmazonHttpApiModule)
        )]
    public class RechargeableHttpApiModule : AbpModule
    {
        public override void ConfigureServices(ServiceConfigurationContext context)
        {
            ConfigureLocalization();
        }

        private void ConfigureLocalization()
        {
            Configure<AbpLocalizationOptions>(options =>
            {
                options.Resources
                    .Get<RechargeableResource>()
                    .AddBaseTypes(
                        typeof(AbpUiResource)
                    );
            });
        }
    }
}
